
/**************************************************************************************************/
/*                                    WHO LIST GRID THINGER                                       */
/**************************************************************************************************/

client
	proc
		UserList()
			while(LoggedIn)
				if(src.inactivity/10 >= 600 && src.Status == "Available")
					world<<"<b>\[</b>[time2text(world.timeofday,"hh:mm:ss")]<b>\] <font color='[html_encode(Bot_Color)]'>@Wench</font></b>: [src.key] has gone idle."
					src.Status = "Idle"

				Chatters = 0
				Active = 0

				for(var/client/M)
					if(M.Status == "Available" || M.Status == "Typing")
						Active++
					Chatters++

				winset(src,"LeftChatters","text=\"[Chatters] chatters - [Active] Active:\"")
				winset(src,"RightChatters","text=\"[Chatters] chatters - [Active] Active:\"")

				if(src.Status == "Available" || src.Status == "Typing")
					if(winget(src,"Main.Input","text") != src.Inputted && length(winget(src,"Main.Input","text")) > 2)
						src.Inputted = winget(src,"Main.Input","text")
						src.Typing = 1
						src.Status = "Typing"
					else
						src.Status = "Available"

				src.mob.icon_state = src.Status

				src.UpdateWho()
				sleep(5)

		UpdateWho()

			var ChattersList = 0

			for(var/client/C)
				if(C.Status == "Available" || C.Status == "Typing")
					ChattersList++
					winset(src,"WhoList.WhoGrid","current-cell=1,[ChattersList]")
					winset(src,"WhoList.WhoGrid","style=\"body{color:[C.Grid_Color];font-weight:[C.Font_Weight];font-size:12px;}")
					src<<output(C.mob,"WhoList.WhoGrid")

			for(var/client/C)
				if(C.Status == "Busy")
					ChattersList++
					winset(src,"WhoList.WhoGrid","current-cell=1,[ChattersList]")
					winset(src,"WhoList.WhoGrid","style=\"body{color:gray;font-weight:lighter;font-size:12px;}")
					src<<output(C.mob,"WhoList.WhoGrid")

			for(var/client/C)
				if(C.Status == "Away")
					ChattersList++
					winset(src,"WhoList.WhoGrid","current-cell=1,[ChattersList]")
					winset(src,"WhoList.WhoGrid","style=\"body{color:gray;font-weight:lighter;font-size:12px;}")
					src<<output(C.mob,"WhoList.WhoGrid")

			for(var/client/C)
				if(C.Status == "Idle")
					ChattersList++
					winset(src,"WhoList.WhoGrid","current-cell=1,[ChattersList]")
					winset(src,"WhoList.WhoGrid","style=\"body{color:gray;font-weight:lighter;font-size:12px;}")
					src<<output(C.mob,"WhoList.WhoGrid")

			winset(src,"WhoList.WhoGrid","cells=1x[ChattersList]")